package newsmessages;

import newsmessages.decorator.ElderlyMessageDecorator;
import newsmessages.decorator.Message;
import newsmessages.decorator.MessageComponent;
import newsmessages.observer.Subject;

public class Engine {

	public static void main(String[] args) {
		System.out.println("Hello, world!");


        //CreateMessage cm = new CreateMessage();
        //Message m = cm.createMessage("Elderly");
        //m.testDecorator();
        //Message m2 = cm.createMessage("Teenage");
        //m.testDecorator();

        MessageComponent mDecorated = new ElderlyMessageDecorator(new Message());
        mDecorated.testDecorator();

        User user1 = new User("Piet");
        User user2 = new User("Tom");
        Subject stream = new Subject();

        stream.attach(user1);
        stream.attach(user2);

        stream.run();
	}
}